<html>
 <head>
  <link href="./leetcode-problem.css" rel="stylesheet" type="text/css">
 </head>
 <body>
  <div class="question_difficulty">
   难度：Easy
  </div>
  <div>
   <h1 class="question_title">
    782. Jewels and Stones
   </h1>
   <p>
    You're given strings
    <code>
     J
    </code>
    representing the types of stones that are jewels, and
    <code>
     S
    </code>
    representing the stones you have.&nbsp; Each character in
    <code>
     S
    </code>
    is a type of stone you have.&nbsp; You want to know how many of the stones you have are also jewels.
   </p>
   <p>
    The letters in
    <code>
     J
    </code>
    are guaranteed distinct, and all characters in
    <code>
     J
    </code>
    and
    <code>
     S
    </code>
    are letters. Letters are case sensitive, so
    <code>
     "a"
    </code>
    is considered a different type of stone from
    <code>
     "A"
    </code>
    .
   </p>
   <p>
    <strong>
     Example 1:
    </strong>
   </p>
   <pre>
<strong>Input:</strong> J = "aA", S = "aAAbbbb"
<strong>Output:</strong> 3
</pre>
   <p>
    <strong>
     Example 2:
    </strong>
   </p>
   <pre>
<strong>Input:</strong> J = "z", S = "ZZ"
<strong>Output:</strong> 0
</pre>
   <p>
    <strong>
     Note:
    </strong>
   </p>
   <ul>
    <li>
     <code>
      S
     </code>
     and
     <code>
      J
     </code>
     will consist of letters and have length at most 50.
    </li>
    <li>
     The characters in
     <code>
      J
     </code>
     are distinct.
    </li>
   </ul>
  </div>
  <div>
   <h1 class="question_title">
    782. 宝石与石头
   </h1>
   <p>
    &nbsp;给定字符串
    <code>
     J
    </code>
    &nbsp;代表石头中宝石的类型，和字符串&nbsp;
    <code>
     S
    </code>
    代表你拥有的石头。&nbsp;
    <code>
     S
    </code>
    &nbsp;中每个字符代表了一种你拥有的石头的类型，你想知道你拥有的石头中有多少是宝石。
   </p>
   <p>
    <code>
     J
    </code>
    &nbsp;中的字母不重复，
    <code>
     J
    </code>
    &nbsp;和&nbsp;
    <code>
     S
    </code>
    中的所有字符都是字母。字母区分大小写，因此
    <code>
     "a"
    </code>
    和
    <code>
     "A"
    </code>
    是不同类型的石头。
   </p>
   <p>
    <strong>
     示例 1:
    </strong>
   </p>
   <pre><strong>输入:</strong> J = "aA", S = "aAAbbbb"
<strong>输出:</strong> 3
</pre>
   <p>
    <strong>
     示例 2:
    </strong>
   </p>
   <pre><strong>输入:</strong> J = "z", S = "ZZ"
<strong>输出:</strong> 0
</pre>
   <p>
    <strong>
     注意:
    </strong>
   </p>
   <ul>
    <li>
     <code>
      S
     </code>
     &nbsp;和&nbsp;
     <code>
      J
     </code>
     &nbsp;最多含有50个字母。
    </li>
    <li>
     &nbsp;
     <code>
      J
     </code>
     &nbsp;中的字符不重复。
    </li>
   </ul>
  </div>
 </body>
</html>